#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>

int main()
{
	int count, sum,n;
	count = 0;
	sum = 0;
	printf("please input a number:");
	scanf("%d",&n);
	while (count++ < n)
	{
		sum = sum + count;
		
	}
	printf("sum = %d\n", sum);
	return 0;
}